function gadget:GetInfo()
  return {
    name      = "Test gadget",
    desc      = "Description here.",
    author    = "Rafal",
    date      = "Dec, 2011",
    license   = "GNU GPL, v2 or later",
    layer     = 0,
    enabled   = true
  }
end

VFS.Include("luarules/utils/debug.lua")
--for tableName, v in pairs(_G) do Spring.Echo (tableName .. ": " .. tostring(v)) end
--for tableName, ud in pairs(UnitDefNames) do printTable ("UnitDefs["..tableName.."].moveData", ud.moveData) end
--for tableName, ud in pairs(UnitDefNames) do printTable ("UnitDefs["..tableName.."].customParams", ud.customParams) end
--for tableName, ud in pairs(UnitDefNames) do printTable ("UnitDefs["..tableName.."].myCustomParams", ud.myCustomParams) end
--for tableName, wd in pairs(WeaponDefNames) do printTable ("WeaponDefs["..tableName.."].myCustomParams", wd.myCustomParams) end
--for tableName, ud in pairs(UnitDefNames) do printTable ("UnitDefs["..tableName.."]", ud) end
--for tableName, wd in pairs(WeaponDefNames) do printTable ("WeaponDefs["..tableName.."]", wd) end

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

--if (not gadgetHandler:IsSyncedCode()) then return false end

--Spring.Echo("------------------------------------------------------------------------TestGadget Outside: Synced = " .. tostring(gadgetHandler:IsSyncedCode()))
-- COMMON
if (gadgetHandler:IsSyncedCode()) then
-- SYNCED
  --Spring.Echo("------------------------------------------------------------------------TestGadget Outside(): Synced!")
  
  function gadget:Initialize()
    --Spring.Echo("------------------------------------------------------------------------TestGadget Initialize(): Synced!")
    --if (not gadgetHandler:IsSyncedCode()) then
    --  gadgetHandler:RemoveGadget()
    --  return
    --end
    --GG.TROLOLO = (GG.TROLOLO or 0) + 1  --always 1
  end 

  function gadget:GameFrame(frameNum)
    --Spring.Echo("------------------------------------------------------------------------TestGadget GameFrame(): Synced!")
  end
  
  function gadget:UnitCreated(unitID, unitDefID, unitTeam, builderID)   
  
  end
-- SYNCED
else
-- UNSYNCED
  --Spring.Echo("------------------------------------------------------------------------TestGadget Outside(): Unsynced!")
  
  function gadget:Initialize()
    --Spring.Echo("------------------------------------------------------------------------TestGadget Initialize(): Unsynced!")
    --GG.TROLOLO = (GG.TROLOLO or 0) + 1  --always 1
  end 

  function gadget:DrawWorld()
    --Spring.Echo("------------------------------------------------------------------------TestGadget DrawWorld(): Unsynced!")
  end
-- UNSYNCED
end
-- COMMON

--[[
if (not gadgetHandler:IsSyncedCode()) then
  return false
end
--// find nukes
for i=1,#WeaponDefs do
  local wd = WeaponDefs[i]
  --note that area of effect is radius, not diameter here!
  if (wd.damageAreaOfEffect >= 300 and wd.targetable) then
    nux[wd.id] = true
    Script.SetWatchWeapon(wd.id, true)
  end
end

function gadget:Explosion(weaponID, px, py, pz, ownerID)
  if (nux[weaponID] and py-GetGroundHeight(px,pz)>100) then
    return true
  end
  return false
end
--]]

--[[
[f=0000000] SYNCED========
[f=0000000] debug
[f=0000000] load
[f=0000000] COB
[f=0000000] SFX
[f=0000000] SendToUnsynced
[f=0000000] EXPORT
[f=0000000] COBSCALE

[f=0000000] UNSYNCED========
[f=0000000] SYNCED
[f=0000000] GL
[f=0000000] sipairs
[f=0000000] snext
[f=0000000] spairs
[f=0000000] gl
--]]

--[[
UnitScript
[f=0000000] SetUnitValue=<function>
[f=0000000] SetDeathScriptFinished=<function>
[f=0000000] CallAsUnit=<function>
[f=0000000] CreateScript=<function>
[f=0000000] GetActiveUnitID=<function>
[f=0000000] GetUnitValue=<function>
[f=0000000] UpdateCallIn=<function>
--]]